<template>
  <div class="app-page">
    <!-- 头 -->
    <div class="app-header">
      <div class="app-title">
        <i :class="$route.meta.icon"></i> {{ $route.meta.title }}
      </div>
    </div>
    <div class="app-page-padding">
      <h3 class="app-page-h3-title">
        rs-transition过渡
      </h3>
      <div class="app-section">
        <div class="rs-transition">
        </div>
      </div>
      <div class="app-section">
        <!-- bidirectional data binding（双向数据绑定） -->
        <codemirror v-model="code" :options="cmOptions"></codemirror>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'StyleButton',
  data () {
    return {
      code: `
// 过渡
.rs-transition {
  width: 220px;
  height: 100px;
  margin: 1px 5px;
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #eee;
  color: #000;

  transition-property: all;
  transition-duration: 0.5s;
  transition-timing-function: ease;
  transition-delay:.7s;
  &:hover {
    border-color: #999;
    background-color: #bbb;
    color: #999;
  }
}
      `,
      cmOptions: {
        // codemirror options
        tabSize: 4,
        mode: 'sass',
        theme: 'darcula',
        lineNumbers: true,
        line: true
        // more codemirror options, 更多 codemirror 的高级配置...
      }
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
// 过渡
.rs-transition {
  width: 220px;
  height: 100px;
  margin: 1px 5px;
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #eee;
  color: #000;

  transition-property: all;
  transition-duration: 0.5s;
  transition-timing-function: ease;
  transition-delay: 0.7s;
  &:hover {
    border-color: #999;
    background-color: #bbb;
    color: #999;
  }
}
</style>
